/*************************************************************************
	> File Name: handle.h
	> Author: ma6174
	> Mail: ma6174@163.com 
	> Created Time: 2021年12月09日 星期四 18时44分31秒
 ************************************************************************/

#include<iostream>
#include <string>

//申请
class Request
{
public:
	Request() = default;
	Request(std::string rt, std::string rc, int n) : requestType(rt), requestContent(rc), number(n) {}

	std::string getRequestType()
	{
		return requestType;
	}

	void setRequestType(std::string rt)
	{
		this->requestType = rt;
	}

	std::string getRequestContent()
	{
		return requestContent;
	}

	void setRequestContent(std::string rc)
	{
		this->requestContent = rc;
	}

	int getNumber()
	{
		return number;
	}

	void setNumber(int n)
	{
		this->number = n;
	}

private:
	std::string requestType;
	std::string requestContent;
	int number;
};


//管理者
class Manager
{
public:
	Manager() = default;
	Manager(std::string n) : name(n) {}

	void getResult(std::string managerLevel, Request request)
	{
		if (managerLevel == "经理")
		{
			if (request.getRequestType() == "请假" && request.getNumber() <= 2)
				std::cout << name << ":\t" << request.getRequestContent() << "\t" <<
					"数量:\t" << request.getNumber() << "\t被批准" << std::endl;
			else
				std::cout << name << ":\t" << request.getRequestContent() << "\t" << 
					"数量:\t" << request.getNumber() << "\t我无权处理" << std::endl;
		}
		else if (managerLevel == "总监")
		{
			if (request.getRequestType() == "请假" && request.getNumber() <= 5)
				std::cout << name << "\t" << request.getRequestContent() << "\t" << 
					"数量:\t" << request.getNumber() << "\t被批准" << std::endl;
			else
				std::cout << name << "\t" << request.getRequestContent() << "\t" << 
					"数量:\t" << request.getNumber() << "\t我无权处理" << std::endl;
		}
		else if (managerLevel == "总经理")
		{
			if (request.getRequestType() == "请假")
				std::cout << name << "\t" << request.getRequestContent() << "\t" << 
					"数量:\t" << request.getNumber() << "\t被批准" << std::endl;
			else if (request.getRequestType() == "加薪" && request.getNumber() <= 500)
				std::cout << name << "\t" << request.getRequestContent() << "\t" << 
					"数量:\t" << request.getNumber() << "\t被批准" << std::endl;
			else if (request.getRequestType() == "加薪" && request.getNumber() > 500)
				std::cout << name << "\t" << request.getRequestContent() << "\t" << 
					"数量:\t" << request.getNumber() << "\t再说把" << std::endl;
		}
	}

protected:
	std::string name;
};
